// @Author chenyong 2023/2/24 8:51:00
package main

import (
	"flag"
	"gitee.com/gychenyong/go-case/model/mindMap"
)

var inputFile = flag.String("i", "", "xmind文件路径")
var outputFile = flag.String("o", "", "输出文件路径")

//var outputType = flag.String("type", "csv", "输出文件类型")

func init() {
	flag.Parse()
}

func main() {
	if *inputFile == "" {
		panic("缺少参数，通过-i选项指定需要转换的文件路径")
	}

	if *outputFile == "" {
		panic("缺少参数，通过-o选项指定输出文件的路径")
	}

	mindMapFile := mindMap.MindMapFile{FilePath: *inputFile}
	rootTopic := mindMapFile.ReadmindMapFileData()
	rootTopic.MindToCase(*outputFile)

}
